<?php
class admin_categoryModel extends baseModel{
    protected $table = 'category_page';

    //获取内容信息
    public function info($cid)
    {
        return $this->find('cid='.$cid);
    }

    //栏目保存
    public function add_save($data)
    {
    	$data['content']=html_in($data['content']);
        $this->insert($data);
    }

    //栏目保存
    public function edit_save($data)
    {
    	$data['content']=html_in($data['content']);
        $this->update('cid='.$data['cid'],$data);
    }

    //栏目删除
    public function del($cid)
    {
        $this->delete('cid='.$cid);
    }

	
}